home *** CD-ROM | disk | FTP | other *** search
- Path: gaia.ns.utk.edu!mbk
- From: mbk@caffeine.engr.utk.edu (Matt Kennel)
- Newsgroups: comp.lang.java,comp.lang.c++
- Subject: Re: Will Java kill C++?
- Followup-To: comp.lang.java,comp.lang.c++
- Date: 16 Apr 1996 19:31:16 GMT
- Organization: University of Tennessee, Knoxville and Oak Ridge National Laboratory
- Message-ID: <4l0si4$pqd@gaia.ns.utk.edu>
- References: <4ksfdr$bhh@engnews2.Eng.Sun.COM> <3172DC7C.6B3F@sdt.com> <4ku4lk$lg6@engnews2.Eng.Sun.COM> <DpyH85.6uu@research.att.com>
- Reply-To: kennel@msr.epm.ornl.gov
- NNTP-Posting-Host: caffeine.engr.utk.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- Andrew Koenig (ark@research.att.com) wrote:
- : In article <4ku4lk$lg6@engnews2.Eng.Sun.COM> linden@positive.Sun.COM (Peter van der Linden) writes:
-
- : > >How would you have maintained C-style linkage and C++ typesafe
- : > >linkage in the same object module without changing the linker?
-
- : > By writing a linker pre-pass program which checks for and enforces
- : > the type-safe linking rules.
-
- : But such a program (a) would have to be rewritten for every machine
- : to which C++ was ported, and (b) would not solve the problem of what
- : name to give the linker for overloaded functions with the same name.
-
- So?
-
- Eiffel and Ada and Sather compilers do it and their generics
- work like a swiss watch.
-
- : For example, suppose one translation unit has
-
- : void f(int) { /* ... */ }
-
- : and another has
-
- : void f(double) { /* ... */ }
-
- : These two translation units are compiled separately. When compiling C++
- : into C, what names should the compiler give to the C versions of these functions
- : so that your hypothetical prelinker will be able to tell them apart?
-
- This shows that link semantics are language semantics (and are "remote
- object call" semantics), and it's only an accident of history that
- assembly, C and Fortran could all be satisfied by the same linking model.
-
- The real problem is that the Unix library API has only 'C' semantics so
- there is not sufficient motivation to leave this tarpit of anachronism.
-
- The other anachronism is the insistence upon 'compiled separately'.
-
- : --
- : --Andrew Koenig
- : ark@research.att.com
-